﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

namespace ExoticCarRental
{
    public partial class Register : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }



        protected void TextBox1_TextChanged(object sender, EventArgs e)
        {

        }

        protected void btnRegister_Click1(object sender, EventArgs e)
        {
            BusinessLayer bl = new BusinessLayer();
            if (bl.CreateLogin(txtEmail.Text, txtPassword.Text) == 0)
            {
                //write ccokie for email and password + loggedin = true
                Response.Redirect("browse.aspx");

            }
            else
            {
                //login failed, return login page and display login failed message 
                registerFail.Text = "Registration Failed";


            }
        }

 


    }
}
